package com.wxy.care;

import com.wxy.care.service.impl.TcpServer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.web.socket.config.annotation.EnableWebSocket;

@SpringBootApplication
public class CareApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(CareApplication.class, args);
        // 获取SocketServer Bean，并调用startServer方法启动Socket服务器
        TcpServer socketServer = context.getBean(TcpServer.class);
        socketServer.startServer();
    }

}
